<form id="form" action="{:url('popupshop/item/edit')}">
    <input type="hidden" name="id" value="{$id}"/>
    <input type="hidden" name="status" value="{$status}"/>
    <input type="hidden" name="page" value="{$page}"/>
    <input type="hidden" id="category_id" name="category_id"  value="{$info.category_id}"/>
    <input type="hidden" id="category_path_id" name="category_path_id"  value="{$info.category_path_id}"/>
    <table class="formtable">
        <tr><th><span class="red">*</span> 商品分类:</th><td><div url="{:url('popupshop/item/category')}" class="ext-select w400 win" id="category_path_name" data="category">{$category_path}</div></td></tr>
        <tr>
            <th>商品属性:</th>
            <td>
                <select datatype="*" class="select" name="types">
                    <option value="0"{if $info.types == 0} selected{/if}>默认属性</option>
                    <option value="1"{if $info.types == 1} selected{/if}>首页推荐</option>
                    <option value="2"{if $info.types == 2} selected{/if}>专题页面</option>
                    <option value="3"{if $info.types == 3} selected{/if}>购物车</option>
                </select>
            </td>
        </tr>
        <tr><th><span class="red">*</span> 商品名称:</th><td><input class="input w500" datatype="*" type="text" name="name" value="{$info.name}" /></td></tr>  
        <tr><th><span class="red">*</span> 推荐语:</th><td><input class="input w500" datatype="*" type="text" name="note" value="{$info.note}" /></td></tr>
        <tr><th>* 商品价格(￥):</th><td>
            <label>成本(￥)：</label><input placeholder="成本价(￥)" class="input w100" datatype="npot" type="text" name="cost_price" value="{$info.cost_price|money}" /> 
            <label>销售(￥)：</label> <input placeholder="销售价(￥)" class="input w100" datatype="npot" type="text" name="sell_price" value="{$info.sell_price|money}"/>
            <label>市场(￥)：</label><input placeholder="市场价(￥)" class="input w100" datatype="npot" type="text" name="market_price" value="{$info.market_price|money}"/>
        </td></tr>
        <tr><th>* 商品属性:</th><td>
            <label>重量(g)：</label><input class="input w100" datatype="n" type="text" name="weight" value="{$info.weight}" />
            <label>使用积分：</label><input class="input w100" datatype="n" type="text" name="points" value="{$info.points}" />
            <label>赠送积分：</label><input class="input w100" datatype="n" type="text" name="repoints"  value="{$info.repoints}" />
        </td></tr>
        <tr class="imgs">
            <th><input type="hidden" name="img" id="img_index"  value="{$info.img}" />产品预览图</th>
            <td id="imgbox">
                <div url="{:url('system/passport.common/upload')}" class="img-review fn-left fn-cp win"></div>
                {foreach $imgs as $pic}<div class="box-view fn-left fn-cp{if $info.img == $pic} current{/if}">
                <input type="hidden" name="imgs[]" value="{$pic}" /><img src="{$pic}" onclick="selectImg(this)">
                <div class="opera">
                    <a class="imgbox-left" href="javascript:;"><i class="iconfont icon-arrowleft"></i></a>
                    <a class="imgbox-right" href="javascript:;"><i class="iconfont icon-arrowright"></i></a>
                    <a class="imgbox-link" href="javascript:;" onclick="linkImg(this)"><i class="iconfont icon-search_icon"></i></a>
                    <a class="imgbox-close" href="javascript:;" onclick="delImg(this)"><i class="iconfont icon-close_icon"></i></a>
                </div>
            </div>{/foreach}</td>
        </tr>
        <tr><th>商品详情</th><td><textarea class="textarea ui-editor" id="content" name="content">{$info.content|dehtml}</textarea></td></tr>
        <tr><th></th><td><input type="submit" value="确定" class="button button-blue submit" /> <input type="reset" value="重置" class="button button-blank" /></td></tr>
    </table>
</form>
<script type="text/javascript">
Do.add('common',{path:'__STATIC__/popupshop/common.js'});
Do('base','layer','form','editor','common',function () {
    $('#form').isForm({'upload':'{:url("system/passport.common/upload")}'});
    $(".win").win();
})
</script>